package com.yunji.storage.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yunji.common.annotation.Excel;
import com.yunji.common.base.BaseDelFlagDO;
import com.yunji.common.base.IEventJbpm;
import com.yunji.storage.enums.DiscardStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.storage.domain
 * @Title: DiscardTicket
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-08-22 10:36:42      V1.0        HuaAo       新建类
 */
@EqualsAndHashCode(callSuper = true)
@TableName("v3_discard_ticket")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DiscardTicketDO extends BaseDelFlagDO implements Serializable , IEventJbpm {

    private static final long serialVersionUID = -598477538472513086L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("报废单据ID")
    private Long discardId;

    @ApiModelProperty("报废单据单号")
    @Excel(name = "报废单据单号", width = 15)
    private String discardCode;

    @ApiModelProperty("维修单据ID")
    private Long repairId;

    @ApiModelProperty("维修单据单号")
    @Excel(name = "维修单据单号", width = 15)
    private String repairCode;

    @ApiModelProperty("发起单位")
    private Long belongId;

    @ApiModelProperty("出库单位")
    private Long outBelongId;

    @ApiModelProperty("申请人ID")
    private Long applyId;

    @ApiModelProperty("申请人所属ID")
    private Long applyBelongId;

    @ApiModelProperty("申请人姓名")
    @Excel(name = "申请人姓名", width = 15)
    private String applyName;

    @ApiModelProperty("申请人所属名称")
    @Excel(name = "申请人所属名称", width = 15)
    private String applyBelongName;

    @ApiModelProperty("申请时间")
    @Excel(name = "申请时间", width = 15)
    private Date applyTime;

    @ApiModelProperty("审核人ID")
    private Long auditId;

    @ApiModelProperty("审核人所属ID")
    private Long auditBelongId;

    @ApiModelProperty("审核人姓名")
    @Excel(name = "审核人姓名", width = 15)
    private String auditName;

    @ApiModelProperty("审核人所属名称")
    @Excel(name = "审核人所属名称", width = 15)
    private String auditBelongName;

    @ApiModelProperty("审核时间")
    @Excel(name = "审核时间", width = 15)
    private Date auditTime;

    @ApiModelProperty("审核状态  0-待审核 1-通过 2-驳回")
    @Excel(name = "审核状态  0-待审核 1-通过 2-驳回", width = 15)
    private Integer auditStatus;

    @ApiModelProperty("报废状态 报废状态 0-草稿 1-已提交 2-已完成 3-已取消 4-作废")
    @Excel(name = "报废状态 报废状态 0-草稿 1-已提交 2-已完成 3-已取消 4-作废", width = 15)
    private Integer discardStatus;

    @ApiModelProperty("附件(照片)")
    @Excel(name = "附件(照片)", width = 15)
    private String albumPics;

    @ApiModelProperty("驳回原因")
    @Excel(name = "驳回原因", width = 15)
    private String reason;

    @ApiModelProperty("报废备注")
    @Excel(name = "报废备注", width = 15)
    private String remark;

    @ApiModelProperty("备注信息")
    @Excel(name = "备注信息", width = 15)
    private String remarks;

    @Override
    public Long getId() {
        return this.getDiscardId();
    }

    @Override
    public Integer getNewStatus() {
        return this.getDiscardStatus();
    }

    @Override
    public String getNewStatusName() {
        return DiscardStatus.get(this.getDiscardStatus());
    }

    @Override
    public Integer getEventType() {
        return 0;
    }
}